home *** CD-ROM | disk | FTP | other *** search
/ The CICA Windows Explosion! / The CICA Windows Explosion! - Disc 2.iso / programr / tkern10.zip / INCLUDE\SYS\TTY.H < prev    next >
Text File  |  1994-02-27  |  4KB  |  113 lines

  1. /*
  2.  *  This file forms part of "TKERN" - "Troy's Kernel for Windows".
  3.  *
  4.  *  Copyright (C) 1991, 1992, 1993 Free Software Foundation, Inc.
  5.  *  Copyright (C) 1994  Troy Rollo <troy@cbme.unsw.EDU.AU>
  6.  *
  7.  *  This library is free software; you can redistribute it and/or
  8.  *  modify it under the terms of the GNU Library General Public
  9.  *  License as published by the Free Software Foundation; either
  10.  *  version 2 of the License, or (at your option) any later version.
  11.  *
  12.  *  This library is distributed in the hope that it will be useful,
  13.  *  but WITHOUT ANY WARRANTY; without even the implied warranty of
  14.  *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
  15.  *  Library General Public License for more details.
  16.  *
  17.  *  You should have received a copy of the GNU Library General Public
  18.  *  License along with this library; if not, write to the Free
  19.  *  Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
  20.  */
  21.  
  22. #ifndef    __TKTTY_H
  23. #define    __TKTTY_H
  24.  
  25. #ifndef __TKIOCTL_H
  26. #include <sys/ioctl.h>
  27. #endif
  28.  
  29. /* Type of ARG for TIOCGETC and TIOCSETC requests.  */
  30. struct tchars
  31. {
  32.   char t_intrc;            /* Interrupt character.  */
  33.   char t_quitc;            /* Quit character.  */
  34.   char t_startc;        /* Start-output character.  */
  35.   char t_stopc;            /* Stop-output character.  */
  36.   char t_eofc;            /* End-of-file character.  */
  37.   char t_brkc;            /* Input delimiter character.  */
  38. };
  39.  
  40. /* Type of ARG for TIOCGLTC and TIOCSLTC requests. */
  41. struct ltchars
  42. {
  43.   char t_suspc;            /* Suspend character.  */
  44.   char t_dsuspc;        /* Delayed suspend character.  */
  45.   char t_rprntc;        /* Reprint-line character.  */
  46.   char t_flushc;        /* Flush-output character.  */
  47.   char t_werasc;        /* Word-erase character.  */
  48.   char t_lnextc;        /* Literal-next character.  */
  49. };
  50.  
  51. /* Type of ARG for TIOCGETP and TIOCSETP requests (and gtty and stty).  */
  52. struct sgttyb
  53. {
  54.   char sg_ispeed;        /* Input speed.  */
  55.   char sg_ospeed;        /* Output speed.  */
  56.   char sg_erase;        /* Erase character.  */
  57.   char sg_kill;            /* Kill character.  */
  58.   unsigned long sg_flags;    /* Mode flags.  */
  59. };
  60.  
  61. /* Type of ARG for TIOCGWINSZ and TIOCSWINSZ requests.  */
  62. struct winsize
  63. {
  64.   unsigned short int ws_row;    /* Rows, in characters.  */
  65.   unsigned short int ws_col;    /* Columns, in characters.  */
  66.  
  67.   unsigned short int ws_xpixel;    /* Horizontal pixels.  */
  68.   unsigned short int ws_ypixel;    /* Vertical pixels.  */
  69. };
  70.  
  71. struct ttysize
  72. {
  73.   unsigned short int ts_lines;
  74.   unsigned short int ts_cols;
  75.   unsigned short int ts_xxx;
  76.   unsigned short int ts_yyy;
  77. };
  78.  
  79. #define    TIOCGETP    _IOW('t', 1, struct sgttyb)
  80. #define    TIOCSETP    _IOR('t', 2, struct sgttyb)
  81. #define    TIOCGLTC    _IOW('t', 3, struct ltchars)
  82. #define    TIOCSLTC    _IOR('t', 4, struct ltchars)
  83. #define    TIOCGETC    _IOW('t', 5, struct tchars)
  84. #define    TIOCSETC    _IOR('t', 6, struct tchars)
  85. #define    TIOCGWINSZ    _IOW('t', 7, struct winsize)
  86. #define    TIOCSWINSZ    _IOR('t', 8, struct winsize)
  87. #define    TIOCGSIZE    TIOCGWINSZ
  88. #define    TIOCSSIZE    TIOCSWINSZ
  89.  
  90. #define    CBREAK    0x00001    /* Pass on each char as received (no edit box)    */
  91. #define    ECHO    0x0002    /* Echo input (Move edit box on screen)        */
  92. #define    CRMOD    0x0004    /* Convert ^M  to ^J on input            */
  93. #define    LITOUT    0x0008    /* No preprocessing of output chars        */
  94. #define    RAW    0x0010    /* Treat input and output as a raw byte stream    */
  95. #define    FLUSHO    0x0020    /* Flush output                    */
  96. #define    DECCTQ    0x0040    /* Only startc restarts after stopc        */
  97. #define    NOFLSH    0x0080    /* Don't flush on interrupt etc            */
  98.  
  99. /* The following options don't really apply to TKERN, but
  100.  * some programs that might reasonably use TKERN might use
  101.  * them anyway.
  102.  */
  103. #define    TANDEM    0x0100
  104. #define    XTABS    0x0200
  105. #define    NOHANG    0x0400
  106. #define    CRTBS    0x0800
  107. #define    PRTERA    0x1000
  108. #define    CRTERA    0x2000
  109. #define    PASS8    0x4000
  110. #define    CTLECH    0x8000
  111.  
  112. #endif /* __TKTTY_H */
  113.